// 应聘列表-应聘详情
var MyApplyDetail = Vue.component('MyApplyDetail', {
    data () {
        return {
            applyDetailData: [
                {
                    name: "招聘公司",
                    content: "",
                }, {
                    name: "职位",
                    content: "",
                }, {
                    name: "还需人数",
                    content: "",
                }, {
                    name: "薪酬（元）",
                    content: "",
                }, {
                    name: "福利待遇",
                    content: "",
                }, {
                    name: "休息制度",
                    content: "",
                }, {
                    name: "学历要求",
                    content: "",
                }, {
                    name: "工作年限",
                    content: "",
                }, {
                    name: "工作地点",
                    content: "",
                }, {
                    name: "岗位要求",
                    content: "",
                }, {
                    name: "工作内容",
                    content: "",
                }, {
                    name: "工作时间",
                    content: "",
                }, {
                    name: "联系人姓名",
                    content: "",
                }, {
                    name: "联系人号码",
                    content: "",
                }, {
                    name: "邮箱地址",
                    content: "",
                }, {
                    name: "性别要求",
                    content: "",
                }, {
                    name: "年龄区间",
                    content: "",
                }, {
                    name: "技术工种",
                    content: "",
                }, {
                    name: "面试状态",
                    content: "",
                }
            ],
            applyDetailContent: ["A公司", "AA职位", "5", "5000", "0暂无；1包住；2包吃", "单休；双休", "1小学；2初中；3高中；4大专；5本科；6研究生；7其他", "1一年以内；2一至两年；3三至五年；4五年以上", "", "", "", "", "1小学；2初中；3高中；4大专；5本科；6研究生；7其他", "1一年以内；2一至两年；3三至五年；4五年以上", "", "", "", "", "投递中/面试中/面试成败"]
        }
    },
    methods: {
        onReturnFun: function () {
            window.history.back(-1)
        },
        onSaveEdit: function () {
            console.log("保存设置")
        }
    },
    // 周期
    created: function () {
        // 应聘列表
        for(var i = 0;i < this.applyDetailData.length;i++) {
            this.applyDetailData[i].content = this.applyDetailContent[i]
        }
    },
    template: ` <div class="my-apply">
                    <div class="apply-header">
                        <div class="apply-header-name">应聘列表</div>
                    </div>
                    <div class="apply-table apply-table-header apply-detail">
                        <table>
                            <tr v-for="value in applyDetailData" v-key="value.id">
                                <td style="width: 50%;">{{value.name}}</td>
                                <td style="width: 50%;">{{value.content}}</td>
                            </tr>
                        </table>

                        <div class="btns">
                            <button class="btn btn-save" @click="onReturnFun">返回</button>
                            <button class="btn btn-primary" @click="onSaveEdit">保存设置</button>
                        </div>
                    </div>
                </div>`
})
